package com.usian.controller;

import com.usian.feign.UserFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import pojo.User;

@RestController
public class ConsumerController {

    @Autowired
    private UserFeign userFeign;

    @RequestMapping(value="/comsumer/getUserById")
    public User getUserById(Integer id,String nam){
        return userFeign.getUserById(id,nam);
    }

    @RequestMapping(value="/test")
    public User test(){
        return userFeign.getUserById(1,"zs");
    }
}
